package com.binarysoft.service.map;

import common.framework.dsb.AbstractServiceBean;
import common.framework.dsb.annotation.DSBService;
import common.framework.dsb.service.ServiceContext;

@DSBService(name = "DSB/DataMapService")
public class DataMapServiceBean extends AbstractServiceBean implements DataMapService {

	private DataMapDAO dataMapDAO = null;

	@Override
	public void start(ServiceContext serviceContext) throws Exception {
		super.start(serviceContext);
		dataMapDAO = new DataMapMySQLDAO();
	}

	@Override
	public void close() throws Exception {
	}

	@Override
	public void refresh() throws Exception {
	}

	public void put(String group, String key, String value) throws Exception {
		dataMapDAO.put(group, key, value);
	}

	public String get(String group, String key) throws Exception {
		return dataMapDAO.get(group, key);
	}

	public void remove(String group, String key) throws Exception {
		dataMapDAO.remove(group, key);

	}

}
